#include"Log.hpp"
#include"mutex.hpp"
#include"pthreadpool.hpp"
#include"Task.hpp"
using namespace LogModule;
using namespace PthreadPoolModule;
int main()
{
  Enable_Console_Log_Strategy();
  int cnt=10;
  while(cnt--)
  {
    sleep(1);
    Pthreadpool<task_t>::GetInstance()->Enqueue(DowenLoad);

  };

  Pthreadpool<task_t>::GetInstance()->Stop();
  Pthreadpool<task_t>::GetInstance()->Join();


    // Enable_Console_Log_Strategy();
    // pthreadpool<task_t>* pools=new pthreadpool<task_t>();
    // pools->Start();
    // int count=10;
    // while(count--)
    // {
    //   pools->Enqueue(DowenLoad);

    //   sleep(1);
    // }
    //logger.EnableFileLogStrategy();
    // logger(LogLevel::DEBUG,"main.cc",8)<<"helloworld"<<3.14<<" ";
    // logger(LogLevel::DEBUG,"main.cc",8)<<"helloworld";
    // logger(LogLevel::DEBUG,"main.cc",8)<<"helloworld";
     sleep(10);
    
    // pools->Stop();
    // pools->Join();
    return 0;
}